package cn.tedu.charging.cost.dao.repository.impl;

import cn.tedu.charging.cost.dao.mapper.ChargingRuleMapper;
import cn.tedu.charging.cost.dao.repository.ChargingRuleRepository;
import cn.tedu.charging.cost.pojo.po.CostRulePO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public class ChargingRuleRepositoryImpl implements ChargingRuleRepository {
    @Autowired
    private ChargingRuleMapper chargingRuleMapper;
    @Override
    public List<CostRulePO> selectCostRules(Integer stationId) {
        QueryWrapper<CostRulePO> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("station_id",stationId);
        List<CostRulePO> costRulePOS = chargingRuleMapper.selectList(queryWrapper);
        return costRulePOS;
    }
}
